package com.mk.carcassonne;

public class Position {
	
	private int _x, _y;
	
	public Position(int x, int y)
	{
		_x = x;
		_y = y;
	}
	
	public int getX()
	{
		return _x;
	}
	
	public int getY()
	{
		return _y;
	}
	
	public void setX(int value)
	{
		_x = value;
	}
	
	public void setY(int value)
	{
		_y = value;
	}
	
	@Override
	public boolean equals(Object obj) {
		if(obj == null)
			return false;
		if(!obj.getClass().isInstance(this))
			return false;
		Position p = (Position)obj;
		if(p.getX() != this._x)
			return false;
		if(p.getY() != this._y)
			return false;
		
		return true;
	}
	
	@Override
	public String toString() {
		return "X: " + _x + " Y: " + _y; 
	}
}
